<extend name="template/base_index" />


<block name="area_header">

	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<!-- 过滤\查询按钮 -->
				<div class="filter-controls hidden">
					<!-- 日期查询 -->
					<form action="{:U('Admin/Advert/index')}" method="post" class="form-inline">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									Banners图片类别
								</div>
								<input type="text" name="type" id="type" class="form-control input-short" value="{$type}" />
							</div>
						</div>
						<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
					</form>
				</div>
				<!-- 操作按钮 -->
				<div class="btn-controls">
					<a class="btn btn-primary btn-sm" href="{:U('Admin/Advert/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>					
				</div>

				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />
							</th>
							<th>
								图片地址
							</th>
							<th>
								跳转链接
							</th>
							<th>
								生效时间
							</th>	
							<th>
								操作
							</th>
						</tr>
					</thead>
					<tbody>
						<empty name="list">
							<tr>
								<td colspan="5" class="text-center">{:L('NO_DATA')}</td>
							</tr>
							<else/>
							<volist name="list" id="vo">
								<tr>
									<td>
										<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" /></td>
									<td>
										<img src="{$vo.img}" style="max-width: 40px;" alt="{$vo.url}" />
									</td>
									<td>
										{$vo.url}
									</td>
									<td>
										{$vo.starttime|date='Y-m-d',###}至{$vo.endtime|date='Y-m-d',###}
									</td>
									<td>
										<a href="{:U('Admin/Advert/edit',array('id'=>$vo['id']))}" class="btn btn-sm btn-default"><i class="fa fa-edit"></i>编辑</a>
										
										<a href="{:U('Admin/Advert/delete',array('id'=>$vo['id']))}" class="ajax-get confirm btn btn-sm btn-danger"><i class="fa fa-trash"></i>删除</a>
									</td>
								</tr>

							</volist>
						</empty>
					</tbody>
				</table>
				<div>{$show}</div>
			</div>

		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
</block>

<block name="area_footer">

</block>